#ifndef _TEXTURE2D_H_
#define _TEXTURE2D_H_
#include "PCH.h"
#include "IResource.h"
#include "RenderDevice.h"

namespace DeviousRenderer
{
	class Texture2DConfig
	{
	public:
		Texture2DConfig();
		virtual ~Texture2DConfig();

		void SetDefault();
		void SetDepthBuffer( UINT width, UINT height );
		void SetColorBuffer( UINT width, UINT height );

		void SetWidth( UINT state );
		void SetHeight( UINT state );
		void SetMipLevels( UINT state );
		void SetArraySize( UINT state );
		void SetFormat( DXGI_FORMAT state );
		void SetSampleDesc( DXGI_SAMPLE_DESC state );
		void SetUsage( D3D11_USAGE state ); 
		void SetBindFlags( UINT state );
		void SetCPUAccessFlags( UINT state );
		void SetMiscFlags( UINT state );

		D3D11_TEXTURE2D_DESC GetTextureDesc();
	protected:
		D3D11_TEXTURE2D_DESC 		m_State;

		friend Renderer;
	};
	class Texture2D : public IResource
	{
	public:
		Texture2D(ID3D11Texture2D* texture);
		virtual ~Texture2D();
		virtual ID3D11Resource*	GetResource()
		{
			return m_pTexture;
		}

	protected:
		ID3D11Texture2D*		m_pTexture;

	};
}
#endif//_TEXTURE2D_H_